<?php

class Donations extends HTech_Db_Table
{
    protected $_name    = 'view_donations';
    protected $_primary = 'DonationId';  
    
    protected function _setGridMetadata()
    {
        $this->_gridMetadata['title'] = $this->translate("Donations");
        $this->_gridMetadata['params'] = array('PartnerId','SponsorId');
        $this->_gridMetadata['onClick'] = 'sponsor.donation.view';
        $this->_gridMetadata['headers'] = array
            (
                array('DonationId',        30, $this->translate("Id"),          'Number'),
                array('Date',             120, $this->translate("Date"),        'DateTime', 'Date'),
                array('SrcCurrencyCode',   80, $this->translate("Currency(s)"), 'String'),
                array('SrcAmount',         80, $this->translate("Amount(s)"),   'Number',   'Standard'),
                array('SrcTip',            80, $this->translate("Tip(s)"),      'Number',   'Standard'),
                array('ConvCurrencyCode',  80, $this->translate("Currency(c)"), 'String'),
                array('ConvAmount',        80, $this->translate("Amount(c)"),   'Number',   'Standard'),
                array('ConvTip',           80, $this->translate("Tip(c)"),      'Number',   'Standard'),
                array('Email',            180, $this->translate("Email"),       'String'),
                array('Sponsor',          250, $this->translate("Sponsor"),     'String'),
                array('Partner',          250, $this->translate("Partner"),     'String'),
                array('Token',            140, $this->translate("Token"),       'String')
            );
        return $this;
    }
}
